import {
    createApp
} from 'vue'
import App from './App.vue'
let app = createApp(App)

// 引入路由并使用
import router from "./router"

// 引入echarts(export | export deafult)
import * as echarts from "echarts"
// 引入自定义的主题json文件
import vintage from "./assets/theme/vintage.json"
import essos from "./assets/theme/essos.json"
// 注册主题数据
echarts.registerTheme('vintage', vintage)
echarts.registerTheme('essos', essos)
// 使用依赖注入全局使用echarts
app.provide('echarts', echarts)

// 引入axios
import api from "./serve/config.js"
app.provide('api', api)

// 引入基础样式实现100%布局
import "./assets/css/reset.css"
// 引入iconfont.css
import "./assets/font/iconfont.css"

// 引入pinia
import { createPinia } from "pinia"
const piniaStore = createPinia()
import socket from './utils/socket.js'
console.log(socket);

app.use(router).use(piniaStore).use(socket).mount('#app')